# coding:utf-8
"""
    @project: automated_testing_platform
    @Author：caicaizi
    @file： get_config.py
    @date：2023/6/9 8:07
"""
import re
with open('base_web_driver.py', 'r', encoding='utf-8') as f:
    content = f.read()
    pattern = r'.*?def (.*?)(self.*?).*?'
    results = re.findall(pattern, content)
    with open('config.txt', 'a', encoding='utf-8') as ff:
        for item in results[2:]:
            order = list(item)[0].split('(')[0]
            ff.write('(\''+order+'\', \''+order+'\'),\n')